<?php
namespace API\Controller;
use Think\Controller;
class ActivityController extends Controller {
    public function getactivity(){
        $user=M('activity');
        $data=$user->order("aid")->select();
        echo json_encode($data);
   

    }
    public function getactivitybyid(){
    	$aid=$_GET['aid'];
        $user=M('activity');
        $data=$user->where("aid=$aid")->select();
        echo json_encode($data);
   

    }
   public function getuserbyname(){
    	$uname=$_GET['uname'];
        $user=M('user');
        $data=$user->where("uname=$uname")->select();
        echo json_encode($data);
   

    } 
}